In general, virtualization allows multiple “machines” or operating system instances to be run on the same physical machine at the same time. A software entity known as the hypervisor (or a Virtual Machine Monitor) interfaces between the hardware and the operating system instances, such that each operating system instance (or virtual machine) is made to believe that it has complete control of the hardware of the physical machine (that has been allotted), while in reality the hypervisor ultimately has complete control.
The number of such virtual machines that can be run on a given physical machine is typically limited by the hardware resources available on the physical machine. Common hardware factors that drive this decision making are, for example, the number (and capacity of) CPUs, the amount of memory available, and the amount storage available on the physical machine. Typically, each virtual machine is statically allotted a certain number of CPUs (known as Virtual CPUs or VCPUs) and a certain amount of memory. This allocation is constantly maintained throughout the life cycle of the virtual machine.
Better resource utilization can be achieved if it were possible to dynamically alter the amount of resources available to a virtual machine. As such, new features in the hypervisor make it possible to reduce or increase the amount of memory available to a virtual machine even when the physical machine is running. For example, the Xen hypervisor and provides such capabilities through a memory ballooning driver. This technique consists of inserting a memory balloon driver into each of the virtual machines, and when it is required for a virtual machine to reduce its memory consumption, the resident balloon driver “demands” more memory from the operating system kernel of the virtual machine. Whatever memory is allocated to the virtual machine is “released” to the hypervisor. The hypervisor can then use this available memory for other virtual machines. If the memory pressure on such a virtual machine increases (e.g., due to increased usage by other applications within the same virtual machine), the balloon driver “deflates” and the hypervisor returns the actual physical memory back to the virtual machine.
Even though this feature makes it possible to do what is commonly referred to as a memory “overcommit” (which means that the sum total of memory allocated to all virtual machines on a particular physical machine exceeds the net physical memory available on the machine, since machines do not completely use up all memory allocated to them at all times, such an overcommit is possible), the weakness of such an approach is that the hypervisor does not have enough information on how much free memory is available with each of the virtual machines. Lacking such information, the hypervisor cannot make intelligent decisions regarding which combinations of virtual machines to place on a physical machine. Hence, for at least these reasons, there is a need for improvements in the art.